package redora.test.rdo.service;

import org.jetbrains.annotations.NotNull;
import redora.service.ServiceBase;
import redora.test.rdo.service.base.JUnitPigServiceJSONBase;
import redora.exceptions.ConnectException;

/**
* Service layer for JSON database access concerning the JUnitPig object.
* Read-only JSON access skips object serialization making it very fast. For modifying
* objects we still fall back to JUnitPigService and object serialization because
* business rules checks need the pojo's.
* Redora actually implements everything in JUnitPigServiceJSONBase and JUnitPigServiceJSON
* extends it. You can add extra services yourself in this class. Usage:
* <code>
* JUnitPigServiceJSON service ServiceFactory.jUnitPigServiceJSON();
* service.doStuff();
* ServiceFactory.close(service);
* </code>
* @author Redora (www.redora.net)
*/
public class JUnitPigServiceJSON extends JUnitPigServiceJSONBase {
    //Protected to avoid instantiation outside ServiceFactory
    protected JUnitPigServiceJSON() throws ConnectException {
        super();
    }

    /**
    * Instantiate by passing an active service.
    * Typically you use this when a transaction is spawned over several objects.
    * @param chain Active statement/connection managed by another service.
    */
    public JUnitPigServiceJSON(@NotNull ServiceBase chain) {
        super(chain);
    }
}
